const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 配件管理路由
const routers = [
  {
    path: '/partsmanage',
    meta: {
      title: '配件管理',
      icon: 'el-icon-s-cooperation'
    },
    redirect: '/partsmanage',
    component: RouteView,
    children: [
      {
        path: '/partsmanage/partinfos',
        meta: {
          title: '配件信息管理'
        },
        redirect: '/partsmanage/partinfos',
        component: RouteView,
        children: [{
          path: '/partsmanage/partinfos/partInfoManage',
          meta: {
            title: '配件基本信息',
            keepAlive: true
          },
          component: AsyncComponent('partsmanage/partinfos/partInfoManage')
        },
          {
            path: '/partsmanage/partinfos/partParameter',
            meta: {
              title: '配件退货参数设置',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/partParameter')
          },
          {
            path: '/partsmanage/partinfos/partSort',
            meta: {
              title: '配件分类对照表',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/partSort')
          },
          {
            path: '/partsmanage/partinfos/partInfoManageDealer',
            meta: {
              title: '经销商配件基础信息',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/partInfoManageDealer')
          },
          {
            path: '/partsmanage/partinfos/accessoriesAddress/index',
            meta: {
              title: '配件收货地址维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/accessoriesAddress/index')
          }
          ,
          {
            path: '/partsmanage/partinfos/accessoriesAddress/accessoriesSh',
            meta: {
              title: '配件收货地址审核',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/accessoriesAddress/accessoriesSh')
          }
          ,
          {
            path: '/partsmanage/partinfos/accessoriesAddress/accessoriesHistroyAddress',
            meta: {
              title: '配件收货地址维护履历',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/accessoriesAddress/accessoriesHistroyAddress')
          }]
      },
      {
        path: '/partsmanage/financialManagement',
        meta: {
          title: '配件经销商财务管理'
        },
        redirect: '/partsmanage/financialManagement',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/financialManagement/capitalAccount',
            meta: {
              title: '经销商资金账户查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/financialManagement/capitalAccount')
          },
          {
            path: '/partsmanage/financialManagement/capitalAccountShop',
            meta: {
              title: '经销商资金账户查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/financialManagement/capitalAccountShop')
          },
          {
            path: '/partsmanage/financialManagement/StandingBook',
            meta: {
              title: '经销商账户台账查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/financialManagement/StandingBook')
          },
          {
            path: '/partsmanage/financialManagement/StandingBookShop',
            meta: {
              title: '经销商账户台账查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/financialManagement/StandingBookShop')
          },
          {
            path: '/partsmanage/financialManagement/findComPayment',
            meta: {
              title: '来款查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/financialManagement/findComPayment')
          }
        ]
      },
      {
        path: '/partsmanage/purchaseManage',
        meta: {
          title: '配件采购管理'
        },
        redirect: '/partsmanage/purchaseManage',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/purchaseManage/purchaseSubmit',
            meta: {
              title: '配件采购提报',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/purchaseManage/purchaseSubmit')
          },
          {
            path: '/partsmanage/purchaseManage/purchaseQuery',
            meta: {
              title: '配件采购查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/purchaseManage/purchaseSubmit/purchaseQuery')
          },
          {
            path: '/partsmanage/purchaseManage/OEMSubmit',
            meta: {
              title: '配件销售代提报',
              keepAlive: true,
            },
            component: AsyncComponent('partsmanage/purchaseManage/purchaseSubmit/OEMSubmit')
          },
          {
            path: '/partsmanage/purchaseManage/OEMQuery',
            meta: {
              title: '配件销售查询',
              keepAlive: true,
            },
            component: AsyncComponent('partsmanage/purchaseManage/purchaseSubmit/OEMQuery')
          },
          {
            path: '/partsmanage/purchaseManage/approval',
            meta: {
              title: '特殊追溯订单审批',
              keepAlive: true,
            },
            component: AsyncComponent('partsmanage/purchaseManage/purchaseSubmit/approval')
          },
          {
            path: '/partsmanage/purchaseManage/BO/cancelApply',
            meta: {
              title: '配件B/O取消申请',
              keepAlive: true,
            },
            component: AsyncComponent('partsmanage/purchaseManage/BO/cancelApply')
          },
          {
            path: '/partsmanage/purchaseManage/BO/query',
            meta: {
              title: '配件B/O查询',
              keepAlive: true,
            },
            component: AsyncComponent('partsmanage/purchaseManage/BO/query')
          },
          {
            path: '/partsmanage/purchaseManage/BO/OEMQuery',
            meta: {
              title: '配件B/O汇总登记',
              keepAlive: true,
            },
            component: AsyncComponent('partsmanage/purchaseManage/BO/OEMQuery')
          },
        ]
      },
      {
        path: '/partsmanage/partinfos',
        meta: {
          title: '配件地址管理'
        },
        redirect: '/partsmanage/partinfos',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/partinfos/accessoriesAddress/index',
            meta: {
              title: '配件收货地址维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/accessoriesAddress/index')
          }
          ,
          {
            path: '/partsmanage/partinfos/accessoriesAddress/accessoriesSh',
            meta: {
              title: '配件收货地址维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/accessoriesAddress/accessoriesSh')
          }
          ,
          {
            path: '/partsmanage/partinfos/accessoriesAddress/accessoriesHistroyAddress',
            meta: {
              title: '配件收货地址维护履历',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partinfos/accessoriesAddress/accessoriesHistroyAddress')
          }
        ]
      },
      {
        path: '/partsmanage/routine',
        meta: {
          title: '配件销售信息管理'
        },
        redirect: '/partsmanage/routine',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/routine/partordertype',
            meta: {
              title: '配件销售订单类型控制',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/routine/partordertype')
          },
          {
            path: '/partsmanage/routine/partcalendar',
            meta: {
              title: '配件常规订购日历查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/routine/partcalendar')
          }
        ]
      },
      {
        path: '/partsmanage/partWarehouseManage',
        meta: {
          title: '配件仓库管理'
        },
        redirect: '/partsmanage/partWarehouseManage',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/partWarehouseManage/centralStorehouse',
            meta: {
              title: '中心库维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partWarehouseManage/centralStorehouse')
          },
          {
            path: '/partsmanage/partWarehouseManage/storehouseDealer',
            meta: {
              title: '中心库与经销商维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/partWarehouseManage/storehouseDealer')
          }
        ]
      },
      {
        path: '/partsmanage/claim',
        meta: {
          title: '配件索赔管理'
        },
        redirect: '/partsmanage/claim',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/claim/apply',
            meta: {
              title: '配件索赔申请',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/claim/apply')
          },
          {
            path: '/partsmanage/claim/query',
            meta: {
              title: '配件索赔查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/claim/query')
          },
          {
            path: '/partsmanage/claim/approve',
            meta: {
              title: '配件索赔单审批',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/claim/approve')
          },
          {
            path: '/partsmanage/claim/warehouse',
            meta: {
              title: '索赔单仓库处理',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/claim/warehouse')
          },
          {
            path: '/partsmanage/claim/effectiveness',
            meta: {
              title: '配件索赔时效设置',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/claim/effectiveness')
          }
        ]
      },
      {
        path: '/partsmanage/shipment',
        meta: {
          title: '配件发运签收'
        },
        redirect: '/partsmanage/shipment',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/shipment/query',
            meta: {
              title: '配件发运单查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/shipment/query')
          },
          {
            path: '/partsmanage/shipment/receive',
            meta: {
              title: '配件发运单签收',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/shipment/receive')
          },
        ]
      },
      {
        path: '/partsmanage/saleReturnManage',
        meta: {
          title: '配件退货管理'
        },
        redirect: '/partsmanage/saleReturnManage',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/saleReturnManage/returnApply',
            meta: {
              title: '配件退货申请',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnApply')
          },
          {
            path: '/partsmanage/saleReturnManage/returnReview',
            meta: {
              title: '配件退货审核',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnReview')
          },
          {
            path: '/partsmanage/saleReturnManage/returnTechReview',
            meta: {
              title: '配件退货技术审核',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnTechReview')
          },
          {
            path: '/partsmanage/saleReturnManage/returnProReview',
            meta: {
              title: '配件退货采购审核',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnProReview')
          },
          {
            path: '/partsmanage/saleReturnManage/returnLogisticsReview',
            meta: {
              title: '退货物流审核',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnLogisticsReview')
          },
          {
            path: '/partsmanage/saleReturnManage/returnWarReview',
            meta: {
              title: '退货仓库审核',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnWarReview')
          },
          {
            path: '/partsmanage/saleReturnManage/returnQuery',
            meta: {
              title: '退货单查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/saleReturnManage/returnQuery')
          }
        ]
      },
      {
        path: '/partsmanage/batteryTrace',
        meta: {
          title: '电池溯源管理'
        },
        redirect: '/partsmanage/batteryTrace',
        component: RouteView,
        children: [
          {
            path: '/partsmanage/batteryTrace/branchEdit',
            meta: {
              title: '电池回收网点维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/branchEdit')
          },
          {
            path: '/partsmanage/batteryTrace/batterySupplier',
            meta: {
              title: '电池供应商维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batterySupplier')
          },
          {
            path: '/partsmanage/batteryTrace/batteryPlant',
            meta: {
              title: '电池厂商维护',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batteryPlant')
          },
          {
            path: '/partsmanage/batteryTrace/batteryMaintenance',
            meta: {
              title: '电池维修登记',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batteryMaintenance')
          },
          {
            path: '/partsmanage/batteryTrace/batteryMaintenance/query',
            meta: {
              title: '电池维修查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batteryMaintenance/query')
          },
          {
            path: '/partsmanage/batteryTrace/batteryRecycle',
            meta: {
              title: '电池回收登记',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batteryRecycle')
          },
          {
            path: '/partsmanage/batteryTrace/batteryRecycle/query',
            meta: {
              title: '电池回收查询',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batteryRecycle/query')
          },
          {
            path: '/partsmanage/batteryTrace/batteryRecycle/handoverConfirmQuery',
            meta: {
              title: '电池回收确认',
              keepAlive: true
            },
            component: AsyncComponent('partsmanage/batteryTrace/batteryRecycle/handoverConfirmQuery')
          },
        ]
      },
      {
        path: '/questionnaire/questionManage',
        meta: {
          title: ' 问卷管理'
        },
        redirect: '/questionnaire/questionManage',
        component: RouteView,
        children: [
          {
            path: '/questionnaire/questionManage/question',
            meta: {
              title: '问题维护',
              keepAlive: true
            },
            component: AsyncComponent('questionnaire/questionManage/question')
          },
          {
            path: '/questionnaire/questionManage/questionnaire',
            meta: {
              title: '问卷维护',
              keepAlive: true
            },
            component: AsyncComponent('questionnaire/questionManage/questionnaire')
          }
        ]
      },
    ]
  }
];
export default routers;
